// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   QuestionsSclPanel.java

package com.boci.clientapp.questions;

import com.boci.clientapp.main.ClientAppLoader;
import com.boci.common.constant.ClientAppConst;
import com.boci.common.ui.AbstractPanel;
import com.boci.common.util.MessagesConfigurator;
import com.boci.common.vo.ResponseVO;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.Locale;
import javax.swing.*;
import javax.swing.border.EtchedBorder;

public class QuestionsSclPanel extends AbstractPanel
{

    public QuestionsSclPanel(Locale pLocale, String pModuleName, String pScreenName)
    {
        super(pLocale, pModuleName, pScreenName);
        initGUI();
        setText(pLocale);
    }

    private void initGUI()
    {
        setPreferredSize(new Dimension(0, 25));
        setLayout(new BorderLayout());
        headerPanel = new JPanel();
        lblTitle = new JLabel();
        taQuestions = new JTextArea();
        questionsSclPane = new JScrollPane();
        headerPanel.setOpaque(false);
        headerPanel.setPreferredSize(new Dimension(0, 25));
        headerPanel.setLayout(new BorderLayout());
        headerPanel.add(lblTitle, "Center");
        taQuestions.setBorder(new EtchedBorder());
        taQuestions.setOpaque(false);
        taQuestions.setEditable(false);
        taQuestions.setLineWrap(true);
        questionsSclPane.setViewportView(taQuestions);
        questionsSclPane.setOpaque(false);
        questionsSclPane.getViewport().setOpaque(false);
        JPanel gapPanel = new JPanel();
        gapPanel.setOpaque(false);
        gapPanel.setPreferredSize(new Dimension(0, 15));
        add(headerPanel, "North");
        add(questionsSclPane, "Center");
        add(gapPanel, "South");
    }

    public void setText(Locale pLocale)
    {
        super.setText(pLocale);
        MessagesConfigurator msgConf = ClientAppLoader.getMessagesConfigurator();
        lblTitle.setText(msgConf.getUIMessages("COMMON_QUESTIONS.TITLE", pLocale));
        taQuestions.setText(msgConf.getCommonQuestions(pLocale));
        taQuestions.select(0, 0);
        setFont(pLocale);
        if(pLocale.equals(ClientAppConst.EN_US))
            taQuestions.setWrapStyleWord(true);
        else
            taQuestions.setWrapStyleWord(false);
    }

    private void setFont(Locale pLocale)
    {
        lblTitle.setFont(ClientAppLoader.getSmallBoldTextFont(pLocale));
        taQuestions.setFont(ClientAppLoader.getSmallPlainTextFont(pLocale));
    }

    public void actionPerformed(ActionEvent actionevent)
    {
    }

    public void refresh()
    {
    }

    public void refresh(ResponseVO responsevo)
    {
    }

    public HashMap getInputValue(String pActionType)
    {
        return null;
    }

    public boolean validate(String pActionType)
    {
        return true;
    }

    public void setDefFocus()
    {
    }

    private JPanel headerPanel;
    private JLabel lblTitle;
    private JTextArea taQuestions;
    private JScrollPane questionsSclPane;
}
